<?php

class Web_Admin_Fondo_Svc_ActualizarFondo
{

    public function doIt()
    {
        $this->actualizar();
    }

    public function actualizar()
    {
        $handle = new Ey_Upload($_FILES['imagen']);

        if ($handle->uploaded) {
            $handle->file_new_name_body = 'background_1';
            $handle->file_new_name_ext = 'jpg';
            $handle->process(PUB_DIR . DS . 'img');
            $handle->clean();
        }

        Ey::redirect(WEB_ROOT . '/admin/fondo');
    }

}